import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib.ticker import MultipleLocator


def split_data(data,stride, size):
    start = 0;
    end = start + size;
    length = data.shape[0]

    arr = []
    while(start<length-size):
        #data_cut = data[start:end]
        #ax = plt.gca()
        #ax.yaxis.set_major_locator(MultipleLocator(0.01))

        #plt.axis('off')
        #plt.plot(data_cut)

        #plt.savefig("{}.png".format(start))
        #plt.show()
        start+=stride
        end = start+size
        print(start)
        print(end)

if __name__ == '__main__':
    data = pd.read_csv('D:/Backup/桌面/a.csv', sep = ' ')
    length = data.shape[0]
    stride = 3000
    size = 10000
    split_data(data,stride,size)